![]() |
PATH![]() |
The USBGetFrameNumberImmediate function returns the current frame number for the specified device. The function completes synchronously and is the recommended function to use for making time calculations for a class driver. It can be called at any execution level. This function also supports multiple USB bus implementations.
OSStatus USBGetFrameNumberImmediate(USBPB *pb);
Required fields in the USBPB parameter block for the USBGetFrameNumberImmediate function are
In multiple USB bus configurations, each bus has an independent frame count. The USBGetFrameNumberImmediate function takes any device, interface, or endpoint reference as input and returns the current frame number for the bus on which that device, interface, or endpoint is connected.
The frame count for each bus is maintained internally by the USB software as a 64 bit value. The USBGetNextFrameNumberImmediate function allows a driver to get either the low 32 bits of this value in the parameter block, or the full 64 bit value in a UInt64 structure. To get the low 32 bits, specify a value of nil in usbBuffer and a value of 0 in usbReqCount . To get the full 64 bits, specify the size of the UInt64 structure in the usbReqCount field and pointer to an address of the structure in usbBuffer .
This function does not call the completion routine. However, a value is required in the usbCompletion field. kUSBNoCallBack can be specified as the completion routine.
The USBGetNextFrameNumberImmediate function returns the following error:
kUSBUnknownDeviceErr
|
-6998 | usbReference does not refer to a current device |
Previous | Back Up One Level | Next | Show Frames | Hide Frames